package org.china.lanzhou.grid;

import java.util.Map;

public final class ElementUtils {

    public static Element getContainsKey(Map map, int key){
        for (Object o : map.keySet()) {
            if(((Element)o).getIndex()==key){
                return (Element) o;
            }
        }
        return null;
    }
    public static  boolean mapContainsKey(Map map,int key){
        for (Object o : map.keySet()) {
            if(((Element)o).getIndex()==key){
                return true;
            }
        }
        return false;
    }
}
